<?php
//=======================================
//###################################
// Kayako Web Solutions
//
// Source Copyright 2001-2004 Kayako Infotech Ltd.
// Unauthorized reproduction is not allowed
// License Number: $%LICENSE%$
// $Author: vshoor $ ($Date: 2005/08/07 05:20:29 $)
// $RCSfile: setup_step2.php,v $ : $Revision: 1.3 $ 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//###################################
//=======================================


if (!defined("INSWIFT")) {
	// File being called directly, end it
	trigger_error("Unable to process $PHP_SELF", E_USER_ERROR);
}

// Cook up the product URL
$setuplocation = "http://".$_SERVER["SERVER_NAME"]."/".substr($_SERVER["PHP_SELF"], 1, strrpos($_SERVER["PHP_SELF"],"/"));
if (trim($_POST["producturl"]) != "")
{
	$default_producturl = $_POST["producturl"];
} else {
	$default_producturl = substr($setuplocation, 0, strlen($setuplocation)-strlen("setup/"));	
}

displayHeader();

displayField("Username", "username", iif(empty($_POST["username"]), "admin", $_POST["username"]), "text", false);
displayField("Full Name", "fullname", $_POST["fullname"], "text", false);
displayField("Staff Email", "email", $_POST["email"], "text", false);
displayField("Password", "password", "", "password", false);
displayField("Password<span class='gtext'>(again)</span>", "password2", "", "password", false);
displayField("Product URL", "producturl", $default_producturl, "text", false);
displayField("Company Name", "companyname", $_POST["companyname"], "text", false);

if ($_SWIFT["error"] == true)
{
	displayError($_SWIFT["errormsg"]);
}
displayFooter();
?>